package com.dyys.samples.extra.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dyys.samples.extra.model.User;

public interface UserMapper extends BaseMapper<User> {
	
	@Select("<script>SELECT 1 ii, u.* FROM m_user u WHERE u.id=#{id}</script>")
	User loadById(Long id);
	
	@Select("SELECT 1 ii, u.* FROM m_user u WHERE u.login_Name=#{loginName}")
	List<User> loadBy(Map<String,Object> params);
	
	@Select("SELECT * FROM m_user")
	Page<User> selectUserPage(Page page);
	
	List<User> loadBy_usingNamedSql_xml(Map<String,Object> params);

}